import java.io.*;
import java.util.Scanner;

public class JavaFirstTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		// While loop example.
		int counter = 0;
		while (counter < 10) {
			//System.out.print("While: ");
			//System.out.println(counter);
			counter += 2;
		}

		// For loop example.
		for (int counterFor = 0; counterFor < 10; counterFor += 2) {
			//System.out.print("For: ");
			//System.out.println(counterFor);
		}
		Scanner InputScanner = new Scanner(System.in);

		int n = InputScanner.nextInt();
		InputScanner.close();

		int prev = 0;
		int next = 1;
		int fibo = 0;
		for (int i = 1; i < n;  i++) {
			fibo = prev + next;
			prev = next;
			next = fibo;
		}
		System.out.println(fibo);
	}

}
